<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Template Units For Numerical Applications</title>
<link href="TUNAstyles.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
<style type="text/css">

.cabeza_cell {
  border-left: 1px solid #000000;
  border-right: 1px solid #000000;
  border-bottom: 1px solid #000000;
  border-top: 1px solid #000000;
  font-family: Arial,Helvetica,sans-serif;
  font-size: 11pt;
  background-color: #ffffff;
  font-weight: lighter;
  color: #000000;
  text-decoration: none;
}
</style>

</head><body>
<div>
<table align="center" width="640" border="0" cellspacing="2" cellpadding="5" class="border">
<tr>
 <td class="cabeza_cell"> 

  <font style="font-family: helvetica; color: #000000;" size=4>
    <font style="font-family: helvetica; color: #336699; font-weight=bold" size=5>TUNA</font> :
    <font style="font-family: helvetica; color: #336699; font-weight=bold" size=5>T</font>emplate
    <font style="font-family: helvetica; color: #336699; font-weight=bold" size=5>U</font>nits for
    <font style="font-family: helvetica; color: #336699; font-weight=bold" size=5>N</font>umerical 
    <font style="font-family: helvetica; color: #336699; font-weight=bold" size=5>A</font>pplications
 </font><br>
  
</td>
</tr>

<tr>
<td class="cabeza_cell">
 <span style="font-family: helvetica; color: #336699;">
 Documentation Ver 1.0.0 August 2011 by
 <a href="http://mmc.geofisica.unam.mx/luiggi">Luis M. de la Cruz</a> <br>
 <a href="http://mmc.geofisica.unam.mx"> GMMC </a> -
 <a href="http://www.geofisica.unam.mx/recnat/"> Depto. de Recursos Naturales </a> -
 <a href="http://www.geofisica.unam.mx"> Instituto de Geof&iacute;sica </a> -
 <a href="http://www.unam.mx"> UNAM </a><br>
 </span>
 </td>

</tr>

</table>
</div>
<br>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li id="searchli">
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<div class="title">Tuna/include/Meshes/StructuredMesh.hpp</div>  </div>
</div>
<div class="contents">
<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*------------------------------------------------------------------------</span>
<a name="l00002"></a>00002 <span class="comment"> *  Copyright (C) 2011  Luis M. de la Cruz Salas</span>
<a name="l00003"></a>00003 <span class="comment"> *</span>
<a name="l00004"></a>00004 <span class="comment"> *  This file is part of TUNA</span>
<a name="l00005"></a>00005 <span class="comment"> *</span>
<a name="l00006"></a>00006 <span class="comment"> *  TUNA is free software: you can redistribute it and/or modify</span>
<a name="l00007"></a>00007 <span class="comment"> *  it under the terms of the GNU General Public License as published by</span>
<a name="l00008"></a>00008 <span class="comment"> *  the Free Software Foundation, either version 3 of the License, or</span>
<a name="l00009"></a>00009 <span class="comment"> *  (at your option) any later version.</span>
<a name="l00010"></a>00010 <span class="comment"> *</span>
<a name="l00011"></a>00011 <span class="comment"> *  TUNA is distributed in the hope that it will be useful,</span>
<a name="l00012"></a>00012 <span class="comment"> *  but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00013"></a>00013 <span class="comment"> *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span>
<a name="l00014"></a>00014 <span class="comment"> *  GNU General Public License for more details.</span>
<a name="l00015"></a>00015 <span class="comment"> *</span>
<a name="l00016"></a>00016 <span class="comment"> *  You should have received a copy of the GNU General Public License</span>
<a name="l00017"></a>00017 <span class="comment"> *  along with this program.  If not, see &lt;http://www.gnu.org/licenses/&gt;.</span>
<a name="l00018"></a>00018 <span class="comment"> ------------------------------------------------------------------------*/</span>
<a name="l00019"></a>00019 
<a name="l00020"></a>00020 <span class="preprocessor">#ifndef _STRUCTUREDMESH_H_</span>
<a name="l00021"></a>00021 <span class="preprocessor"></span><span class="preprocessor">#define _STRUCTUREDMESH_H_</span>
<a name="l00022"></a>00022 <span class="preprocessor"></span>
<a name="l00023"></a>00023 <span class="preprocessor">#include &lt;iostream&gt;</span>
<a name="l00024"></a>00024 <span class="preprocessor">#include &lt;string&gt;</span>
<a name="l00025"></a>00025 <span class="preprocessor">#include &lt;fstream&gt;</span>
<a name="l00026"></a>00026 <span class="preprocessor">#include &quot;Meshes/GeneralMesh.hpp&quot;</span>
<a name="l00027"></a>00027 
<a name="l00028"></a>00028 <span class="keyword">namespace </span>Tuna {
<a name="l00029"></a>00029 
<a name="l00030"></a>00030 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;  <span class="keyword">class </span>StructuredMesh;
<a name="l00031"></a>00031   
<a name="l00036"></a>00036 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;  
<a name="l00037"></a><a class="code" href="structTuna_1_1Typeinfo_3_01StructuredMesh_3_01T_01_4_01_4.html">00037</a> <span class="keyword">struct </span>Typeinfo &lt;<a class="code" href="classTuna_1_1StructuredMesh.html" title="General structured meshes on rectangular domains.">StructuredMesh</a>&lt;T&gt; &gt; {
<a name="l00038"></a>00038   <span class="keyword">typedef</span> <span class="keyword">typename</span> Typeinfo&lt;T&gt;::prec_t prec_t;
<a name="l00039"></a>00039   <span class="keyword">enum</span> { Dim = Typeinfo&lt;T&gt;::Dim };
<a name="l00040"></a>00040 };
<a name="l00041"></a>00041 
<a name="l00055"></a>00055 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Tadaptor&gt;
<a name="l00056"></a><a class="code" href="classTuna_1_1StructuredMesh.html">00056</a> <span class="keyword">class </span><a class="code" href="classTuna_1_1StructuredMesh.html" title="General structured meshes on rectangular domains.">StructuredMesh</a> : <span class="keyword">public</span> <a class="code" href="classTuna_1_1GeneralMesh.html" title="General class for meshes.">GeneralMesh</a>&lt;StructuredMesh&lt;Tadaptor&gt; &gt; {
<a name="l00057"></a>00057 
<a name="l00058"></a>00058 <span class="keyword">public</span>:
<a name="l00059"></a>00059   
<a name="l00061"></a><a class="code" href="classTuna_1_1StructuredMesh.html#a2466a6c86a4e811d7dff4fc63a9bb400">00061</a>   <span class="keyword">typedef</span> <span class="keyword">typename</span> Typeinfo&lt;Tadaptor&gt;::prec_t <a class="code" href="classTuna_1_1StructuredMesh.html#a2466a6c86a4e811d7dff4fc63a9bb400" title="Precision for all calculations.">prec_t</a>;
<a name="l00063"></a><a class="code" href="classTuna_1_1StructuredMesh.html#a6f27858a7441687f42c83385efab65b9">00063</a>   <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="structTuna_1_1TunaArray.html" title="tiny used mainly for extents and deltas of meshes (blitz-TinyVector based) and huge used for general ...">TunaArray&lt;int, Typeinfo&lt;Tadaptor&gt;::Dim</a> &gt;::tiny <a class="code" href="classTuna_1_1StructuredMesh.html#a6f27858a7441687f42c83385efab65b9" title="Array of ints to define extents.">intTinyArray_t</a>;
<a name="l00065"></a><a class="code" href="classTuna_1_1StructuredMesh.html#a5d2e4898cfcf8d3d4d4366350ed0e794">00065</a>   <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="structTuna_1_1TunaArray.html" title="tiny used mainly for extents and deltas of meshes (blitz-TinyVector based) and huge used for general ...">TunaArray&lt;prec_t, Typeinfo&lt;Tadaptor&gt;::Dim</a> &gt;::tiny <a class="code" href="classTuna_1_1StructuredMesh.html#a5d2e4898cfcf8d3d4d4366350ed0e794" title="Array of floats to define the deltas in each axis.">floatTinyArray_t</a>;
<a name="l00067"></a><a class="code" href="classTuna_1_1StructuredMesh.html#a302a09126d84cb298a2b97e85fb031c1">00067</a>   <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="structTuna_1_1TunaArray.html" title="tiny used mainly for extents and deltas of meshes (blitz-TinyVector based) and huge used for general ...">TunaArray&lt;prec_t,1&gt;::huge</a> <a class="code" href="classTuna_1_1StructuredMesh.html#a302a09126d84cb298a2b97e85fb031c1" title="Arrays for numbers.">ScalarField1D</a>;
<a name="l00068"></a>00068 
<a name="l00069"></a>00069   <a class="code" href="classTuna_1_1StructuredMesh.html#a1cc9d6efd5e3372830be91d85774aeb6" title="Default constructor.">StructuredMesh</a>();  
<a name="l00070"></a>00070   <a class="code" href="classTuna_1_1StructuredMesh.html#a1cc9d6efd5e3372830be91d85774aeb6" title="Default constructor.">StructuredMesh</a>(<a class="code" href="classTuna_1_1GeneralMesh.html#aa7036b4f255ec46446443d26b6a770c2" title="Precision used for the numerical operations.">prec_t</a> l1, <span class="keywordtype">int</span> e1);
<a name="l00071"></a>00071   <a class="code" href="classTuna_1_1StructuredMesh.html#a1cc9d6efd5e3372830be91d85774aeb6" title="Default constructor.">StructuredMesh</a>(<a class="code" href="classTuna_1_1GeneralMesh.html#aa7036b4f255ec46446443d26b6a770c2" title="Precision used for the numerical operations.">prec_t</a> l1, <span class="keywordtype">int</span> e1, <a class="code" href="classTuna_1_1GeneralMesh.html#aa7036b4f255ec46446443d26b6a770c2" title="Precision used for the numerical operations.">prec_t</a> l2, <span class="keywordtype">int</span> e2);
<a name="l00072"></a>00072   <a class="code" href="classTuna_1_1StructuredMesh.html#a1cc9d6efd5e3372830be91d85774aeb6" title="Default constructor.">StructuredMesh</a>(<a class="code" href="classTuna_1_1GeneralMesh.html#aa7036b4f255ec46446443d26b6a770c2" title="Precision used for the numerical operations.">prec_t</a> l1, <span class="keywordtype">int</span> e1, <a class="code" href="classTuna_1_1GeneralMesh.html#aa7036b4f255ec46446443d26b6a770c2" title="Precision used for the numerical operations.">prec_t</a> l2, <span class="keywordtype">int</span> e2, <a class="code" href="classTuna_1_1GeneralMesh.html#aa7036b4f255ec46446443d26b6a770c2" title="Precision used for the numerical operations.">prec_t</a> l3, <span class="keywordtype">int</span> e3);
<a name="l00073"></a>00073   <a class="code" href="classTuna_1_1StructuredMesh.html#a1cc9d6efd5e3372830be91d85774aeb6" title="Default constructor.">StructuredMesh</a>(<span class="keyword">const</span> <a class="code" href="classTuna_1_1StructuredMesh.html" title="General structured meshes on rectangular domains.">StructuredMesh</a>&amp; other);
<a name="l00074"></a>00074   ~<a class="code" href="classTuna_1_1StructuredMesh.html" title="General structured meshes on rectangular domains.">StructuredMesh</a>() {}
<a name="l00075"></a>00075     
<a name="l00076"></a>00076 <span class="comment">// The Curiously Recursive Template Pattern (CRTP).</span>
<a name="l00077"></a><a class="code" href="classTuna_1_1StructuredMesh.html#a58a9f9c65f89fa3fb996744054a3a0f3">00077</a>   Tadaptor&amp; <a class="code" href="classTuna_1_1StructuredMesh.html#a58a9f9c65f89fa3fb996744054a3a0f3" title="This funtion gets an returns a reference to the derived class, using the Curiously Recursive Template...">asDerived</a>() { <span class="keywordflow">return</span> <span class="keyword">static_cast&lt;</span>Tadaptor&amp;<span class="keyword">&gt;</span>(*this); }
<a name="l00078"></a>00078 
<a name="l00079"></a>00079   <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classTuna_1_1StructuredMesh.html#a621b58febbf4e84dc7db8c32f29a552f" title="Resize the mesh in 1D.">resize</a>(prec_t l1, <span class="keywordtype">int</span> e1);
<a name="l00080"></a>00080   <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classTuna_1_1StructuredMesh.html#a621b58febbf4e84dc7db8c32f29a552f" title="Resize the mesh in 1D.">resize</a>(prec_t l1, <span class="keywordtype">int</span> e1, prec_t l2, <span class="keywordtype">int</span> e2);
<a name="l00081"></a>00081   <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classTuna_1_1StructuredMesh.html#a621b58febbf4e84dc7db8c32f29a552f" title="Resize the mesh in 1D.">resize</a>(prec_t l1, <span class="keywordtype">int</span> e1, prec_t l2, <span class="keywordtype">int</span> e2, prec_t l3, <span class="keywordtype">int</span> e3);
<a name="l00082"></a>00082     
<a name="l00086"></a><a class="code" href="classTuna_1_1StructuredMesh.html#a2631f074dfa3ae3c2d5aebe40719d5d6">00086</a>   <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="classTuna_1_1StructuredMesh.html#a2631f074dfa3ae3c2d5aebe40719d5d6" title="Returns the dimension of the mesh.">getDimension</a>() { <span class="keywordflow">return</span> this-&gt;<a class="code" href="classTuna_1_1GeneralMesh.html#adb1220f6fe8395185eba4973fa2e71e2" title="Dimension of the mesh.">Dim</a>; }
<a name="l00087"></a>00087 
<a name="l00092"></a><a class="code" href="classTuna_1_1StructuredMesh.html#a2d38e65625c19f794c0bebd9c16d7ca5">00092</a>   <span class="keyword">inline</span> <a class="code" href="classTuna_1_1GeneralMesh.html#aa7036b4f255ec46446443d26b6a770c2" title="Precision used for the numerical operations.">prec_t</a> <a class="code" href="classTuna_1_1StructuredMesh.html#a2d38e65625c19f794c0bebd9c16d7ca5" title="Returns the length of the mesh in each axis.">getLength</a>(Axis_t i) { <span class="keywordflow">return</span> <a class="code" href="classTuna_1_1StructuredMesh.html#a0a194d778e5d3a37ded19c495aa61b75" title="Length of the mesh.">length</a>(i); }
<a name="l00093"></a>00093 
<a name="l00098"></a><a class="code" href="classTuna_1_1StructuredMesh.html#aaba777c073533ba2c27b21c02d6f3c7e">00098</a>   <span class="keyword">inline</span> <a class="code" href="classTuna_1_1GeneralMesh.html#aa7036b4f255ec46446443d26b6a770c2" title="Precision used for the numerical operations.">prec_t</a> <a class="code" href="classTuna_1_1StructuredMesh.html#aaba777c073533ba2c27b21c02d6f3c7e" title="Returns the deltas of the mesh in each axis.">getDelta</a>(Axis_t i) { <span class="keywordflow">return</span> <a class="code" href="classTuna_1_1StructuredMesh.html#a8a86b5005b0f5a4591bb9844f8f097a0" title="Mesh increments.">delta</a>(i); }
<a name="l00099"></a>00099 
<a name="l00104"></a><a class="code" href="classTuna_1_1StructuredMesh.html#a0f91652c4a19682f5b91b356dea3b921">00104</a>   <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="classTuna_1_1StructuredMesh.html#a0f91652c4a19682f5b91b356dea3b921" title="Returns the nodes of the mesh in each axis.">getExtentNodes</a>(Axis_t i) { <span class="keywordflow">return</span> <a class="code" href="classTuna_1_1StructuredMesh.html#ac472939abf443b774c2db7b14d41582c" title="Extent for nodes in the mesh.">extent_nodes</a>(i); }
<a name="l00105"></a>00105 
<a name="l00110"></a><a class="code" href="classTuna_1_1StructuredMesh.html#a9585dedb8135e52cbee25aaf5b15f851">00110</a>   <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="classTuna_1_1StructuredMesh.html#a9585dedb8135e52cbee25aaf5b15f851" title="Returns the volumes of the mesh in each axis.">getExtentVolumes</a>(Axis_t i) { <span class="keywordflow">return</span> <a class="code" href="classTuna_1_1StructuredMesh.html#aa02e4ec5662120aa1035987bbe7340ac" title="Extent for volumes in the mesh.">extent_volumes</a>(i); }
<a name="l00111"></a>00111 
<a name="l00115"></a><a class="code" href="classTuna_1_1StructuredMesh.html#afab6ee34f1e25f913b7f89f44e14ad00">00115</a>   <span class="keyword">inline</span> <span class="keyword">const</span> <a class="code" href="classTuna_1_1StructuredMesh.html#a5d2e4898cfcf8d3d4d4366350ed0e794" title="Array of floats to define the deltas in each axis.">floatTinyArray_t</a>&amp; <a class="code" href="classTuna_1_1StructuredMesh.html#afab6ee34f1e25f913b7f89f44e14ad00" title="Returns an array with the lengths of the mesh in all axes.">getLength</a>() { <span class="keywordflow">return</span> <a class="code" href="classTuna_1_1StructuredMesh.html#a0a194d778e5d3a37ded19c495aa61b75" title="Length of the mesh.">length</a>; }
<a name="l00116"></a>00116 
<a name="l00120"></a><a class="code" href="classTuna_1_1StructuredMesh.html#a28eefd152c32d59840b14801fceb553e">00120</a>   <span class="keyword">inline</span> <span class="keyword">const</span> <a class="code" href="classTuna_1_1StructuredMesh.html#a5d2e4898cfcf8d3d4d4366350ed0e794" title="Array of floats to define the deltas in each axis.">floatTinyArray_t</a>&amp; <a class="code" href="classTuna_1_1StructuredMesh.html#a28eefd152c32d59840b14801fceb553e" title="Returns an array with the deltas of the mesh in all axes.">getDeltas</a>() { <span class="keywordflow">return</span> <a class="code" href="classTuna_1_1StructuredMesh.html#a8a86b5005b0f5a4591bb9844f8f097a0" title="Mesh increments.">delta</a>; }  
<a name="l00121"></a>00121 
<a name="l00122"></a>00122   <span class="keyword">inline</span> <span class="keywordtype">int</span> getExtentDeltasVols(Axis_t a) { <span class="keywordflow">return</span> <a class="code" href="classTuna_1_1StructuredMesh.html#aea159ef45b6d47b8496b18dca4cdad0d" title="Array of deltas for nonuniform meshes.">dxyz</a>[a].size(); }
<a name="l00126"></a><a class="code" href="classTuna_1_1StructuredMesh.html#a1a6c5bec3c6ff53e460e7b643537d7e1">00126</a>   <span class="keyword">inline</span> <a class="code" href="classTuna_1_1GeneralMesh.html#a69519790ee3b38108b997cf46aa264e8" title="Arrays for numbers.">ScalarField1D</a> <a class="code" href="classTuna_1_1StructuredMesh.html#a1a6c5bec3c6ff53e460e7b643537d7e1" title="Returns the deltas of volumes for the case of non-uniform meshes.">getDeltasVols</a>(Axis_t a) {
<a name="l00127"></a>00127     <a class="code" href="classTuna_1_1GeneralMesh.html#a69519790ee3b38108b997cf46aa264e8" title="Arrays for numbers.">ScalarField1D</a> aux( <a class="code" href="classTuna_1_1StructuredMesh.html#aea159ef45b6d47b8496b18dca4cdad0d" title="Array of deltas for nonuniform meshes.">dxyz</a>[a].size() );
<a name="l00128"></a>00128     <span class="keywordtype">int</span> i = 0;
<a name="l00129"></a>00129     <span class="keywordflow">for</span>(viter = <a class="code" href="classTuna_1_1StructuredMesh.html#aea159ef45b6d47b8496b18dca4cdad0d" title="Array of deltas for nonuniform meshes.">dxyz</a>[a].begin(); viter != <a class="code" href="classTuna_1_1StructuredMesh.html#aea159ef45b6d47b8496b18dca4cdad0d" title="Array of deltas for nonuniform meshes.">dxyz</a>[a].end(); ++viter, ++i) {
<a name="l00130"></a>00130       aux(i) = *viter;
<a name="l00131"></a>00131     }
<a name="l00132"></a>00132     <span class="keywordflow">return</span> aux;    
<a name="l00133"></a>00133   }  
<a name="l00134"></a>00134 
<a name="l00135"></a>00135   <span class="keyword">inline</span> <span class="keywordtype">int</span> getExtentDeltasFace(Axis_t a) { <span class="keywordflow">return</span> <a class="code" href="classTuna_1_1StructuredMesh.html#a14421bdd2cb5ec4b373c9ef9f41a90ba" title="Array of deltas for faces in FV method.">dface</a>[a].size(); }
<a name="l00139"></a><a class="code" href="classTuna_1_1StructuredMesh.html#ab1a9871aaa219dee39dd18178d58a684">00139</a>   <span class="keyword">inline</span> <a class="code" href="classTuna_1_1GeneralMesh.html#a69519790ee3b38108b997cf46aa264e8" title="Arrays for numbers.">ScalarField1D</a> <a class="code" href="classTuna_1_1StructuredMesh.html#ab1a9871aaa219dee39dd18178d58a684" title="Returns the deltas of the faces for the case of non-uniform meshes.">getDeltasFace</a>(Axis_t a) {
<a name="l00140"></a>00140     <a class="code" href="classTuna_1_1GeneralMesh.html#a69519790ee3b38108b997cf46aa264e8" title="Arrays for numbers.">ScalarField1D</a> aux( <a class="code" href="classTuna_1_1StructuredMesh.html#a14421bdd2cb5ec4b373c9ef9f41a90ba" title="Array of deltas for faces in FV method.">dface</a>[a].size() );
<a name="l00141"></a>00141     <span class="keywordtype">int</span> i = 0;
<a name="l00142"></a>00142     <span class="keywordflow">for</span>(viter = <a class="code" href="classTuna_1_1StructuredMesh.html#a14421bdd2cb5ec4b373c9ef9f41a90ba" title="Array of deltas for faces in FV method.">dface</a>[a].begin(); viter != <a class="code" href="classTuna_1_1StructuredMesh.html#a14421bdd2cb5ec4b373c9ef9f41a90ba" title="Array of deltas for faces in FV method.">dface</a>[a].end(); ++viter, ++i)
<a name="l00143"></a>00143       aux(i) = *viter;
<a name="l00144"></a>00144     <span class="keywordflow">return</span> aux; 
<a name="l00145"></a>00145   }
<a name="l00146"></a>00146 
<a name="l00150"></a><a class="code" href="classTuna_1_1StructuredMesh.html#ae49efe725fd74527e5269ac3ce758201">00150</a>   <span class="keyword">inline</span> <span class="keyword">const</span> <a class="code" href="classTuna_1_1StructuredMesh.html#a6f27858a7441687f42c83385efab65b9" title="Array of ints to define extents.">intTinyArray_t</a>&amp; <a class="code" href="classTuna_1_1StructuredMesh.html#ae49efe725fd74527e5269ac3ce758201" title="Returns an array with the number of nodes of the mesh in each axis.">getExtentNodes</a>()   { <span class="keywordflow">return</span> <a class="code" href="classTuna_1_1StructuredMesh.html#ac472939abf443b774c2db7b14d41582c" title="Extent for nodes in the mesh.">extent_nodes</a>; }
<a name="l00151"></a>00151 
<a name="l00155"></a><a class="code" href="classTuna_1_1StructuredMesh.html#abbfe82ff0c5198bca6ce9a9acf588f44">00155</a>   <span class="keyword">inline</span> <span class="keyword">const</span> <a class="code" href="classTuna_1_1StructuredMesh.html#a6f27858a7441687f42c83385efab65b9" title="Array of ints to define extents.">intTinyArray_t</a>&amp; <a class="code" href="classTuna_1_1StructuredMesh.html#abbfe82ff0c5198bca6ce9a9acf588f44" title="Returns an array with the number of volumes of the mesh in each axis.">getExtentVolumes</a>() { <span class="keywordflow">return</span> <a class="code" href="classTuna_1_1StructuredMesh.html#aa02e4ec5662120aa1035987bbe7340ac" title="Extent for volumes in the mesh.">extent_volumes</a>; }
<a name="l00156"></a>00156 
<a name="l00160"></a><a class="code" href="classTuna_1_1StructuredMesh.html#af4d4ba6cd39da7f441c26a1514edff6a">00160</a>   <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classTuna_1_1StructuredMesh.html#af4d4ba6cd39da7f441c26a1514edff6a" title="Function used to calculate the points of the mesh.">calcPoints</a>() { <span class="keywordflow">return</span> <a class="code" href="classTuna_1_1StructuredMesh.html#a58a9f9c65f89fa3fb996744054a3a0f3" title="This funtion gets an returns a reference to the derived class, using the Curiously Recursive Template...">asDerived</a>().calcPoints(); }
<a name="l00161"></a>00161 
<a name="l00165"></a><a class="code" href="classTuna_1_1StructuredMesh.html#a706418d08b552d2db3567bdcf612ed3d">00165</a>   <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classTuna_1_1StructuredMesh.html#a706418d08b552d2db3567bdcf612ed3d" title="Function used to calculate the elements of the mesh.">calcElements</a>() { <span class="keywordflow">return</span> <a class="code" href="classTuna_1_1StructuredMesh.html#a58a9f9c65f89fa3fb996744054a3a0f3" title="This funtion gets an returns a reference to the derived class, using the Curiously Recursive Template...">asDerived</a>().calcElements(); }  
<a name="l00166"></a>00166 
<a name="l00176"></a>00176   <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Tfunct&gt;
<a name="l00177"></a><a class="code" href="classTuna_1_1StructuredMesh.html#a2ddfa0e61b676522d65e521582684a54">00177</a>   <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classTuna_1_1StructuredMesh.html#af4d4ba6cd39da7f441c26a1514edff6a" title="Function used to calculate the points of the mesh.">calcPoints</a>(Axis_t a, Tfunct f, 
<a name="l00178"></a>00178                          <a class="code" href="classTuna_1_1GeneralMesh.html#aa7036b4f255ec46446443d26b6a770c2" title="Precision used for the numerical operations.">prec_t</a> p1 = 0, <a class="code" href="classTuna_1_1GeneralMesh.html#aa7036b4f255ec46446443d26b6a770c2" title="Precision used for the numerical operations.">prec_t</a> p2 = -1, <span class="keywordtype">int</span> n = -1)
<a name="l00179"></a>00179   {
<a name="l00180"></a>00180     <span class="keywordflow">if</span> ( p2 == -1 ) p2 = <a class="code" href="classTuna_1_1StructuredMesh.html#a0a194d778e5d3a37ded19c495aa61b75" title="Length of the mesh.">length</a>(a);
<a name="l00181"></a>00181     <span class="keywordflow">if</span> ( n == -1 ) n = <a class="code" href="classTuna_1_1StructuredMesh.html#ac472939abf443b774c2db7b14d41582c" title="Extent for nodes in the mesh.">extent_nodes</a>(a);
<a name="l00182"></a>00182     <span class="keywordflow">return</span> <a class="code" href="classTuna_1_1StructuredMesh.html#a58a9f9c65f89fa3fb996744054a3a0f3" title="This funtion gets an returns a reference to the derived class, using the Curiously Recursive Template...">asDerived</a>().calcPoints(a, f, p1, p2, n);
<a name="l00183"></a>00183   }  
<a name="l00184"></a>00184 
<a name="l00188"></a><a class="code" href="classTuna_1_1StructuredMesh.html#acc966bea14f30f56f77ba35225d7b408">00188</a>   <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classTuna_1_1StructuredMesh.html#acc966bea14f30f56f77ba35225d7b408" title="Calculate the deltas for non-uniform meshes.">calcDeltas</a>(Axis_t a) { <span class="keywordflow">return</span> <a class="code" href="classTuna_1_1StructuredMesh.html#a58a9f9c65f89fa3fb996744054a3a0f3" title="This funtion gets an returns a reference to the derived class, using the Curiously Recursive Template...">asDerived</a>().calcDeltas(a); }
<a name="l00189"></a>00189     
<a name="l00193"></a>00193   <a class="code" href="classTuna_1_1StructuredMesh.html" title="General structured meshes on rectangular domains.">StructuredMesh&lt;Tadaptor&gt;</a>&amp; <a class="code" href="classTuna_1_1StructuredMesh.html#a35b23b52af6436f69566a173302482b8" title="Make a mesh equal to other existing mesh.">operator=</a>(<span class="keyword">const</span> <a class="code" href="classTuna_1_1StructuredMesh.html" title="General structured meshes on rectangular domains.">StructuredMesh&lt;Tadaptor&gt;</a>&amp; other);
<a name="l00194"></a>00194     
<a name="l00195"></a>00195   <span class="keywordtype">bool</span> <a class="code" href="classTuna_1_1StructuredMesh.html#af921bd8d0279b7510d8db6f7d87652c2" title="Print the info of the mesh on to the screen.">print</a>();
<a name="l00196"></a>00196   <span class="keywordtype">bool</span> <a class="code" href="classTuna_1_1StructuredMesh.html#af921bd8d0279b7510d8db6f7d87652c2" title="Print the info of the mesh on to the screen.">print</a>(<span class="keywordtype">int</span> I, <span class="keywordtype">int</span> J = -1, <span class="keywordtype">int</span> K = -1);
<a name="l00197"></a>00197 
<a name="l00198"></a>00198 <span class="keyword">protected</span>:
<a name="l00199"></a><a class="code" href="classTuna_1_1StructuredMesh.html#ac472939abf443b774c2db7b14d41582c">00199</a>   <a class="code" href="classTuna_1_1StructuredMesh.html#a6f27858a7441687f42c83385efab65b9" title="Array of ints to define extents.">intTinyArray_t</a> <a class="code" href="classTuna_1_1StructuredMesh.html#ac472939abf443b774c2db7b14d41582c" title="Extent for nodes in the mesh.">extent_nodes</a>;   
<a name="l00200"></a><a class="code" href="classTuna_1_1StructuredMesh.html#aa02e4ec5662120aa1035987bbe7340ac">00200</a>   <a class="code" href="classTuna_1_1StructuredMesh.html#a6f27858a7441687f42c83385efab65b9" title="Array of ints to define extents.">intTinyArray_t</a> <a class="code" href="classTuna_1_1StructuredMesh.html#aa02e4ec5662120aa1035987bbe7340ac" title="Extent for volumes in the mesh.">extent_volumes</a>; 
<a name="l00201"></a><a class="code" href="classTuna_1_1StructuredMesh.html#a0a194d778e5d3a37ded19c495aa61b75">00201</a>   <a class="code" href="classTuna_1_1StructuredMesh.html#a5d2e4898cfcf8d3d4d4366350ed0e794" title="Array of floats to define the deltas in each axis.">floatTinyArray_t</a> <a class="code" href="classTuna_1_1StructuredMesh.html#a0a194d778e5d3a37ded19c495aa61b75" title="Length of the mesh.">length</a>;       
<a name="l00202"></a><a class="code" href="classTuna_1_1StructuredMesh.html#a8a86b5005b0f5a4591bb9844f8f097a0">00202</a>   <a class="code" href="classTuna_1_1StructuredMesh.html#a5d2e4898cfcf8d3d4d4366350ed0e794" title="Array of floats to define the deltas in each axis.">floatTinyArray_t</a> <a class="code" href="classTuna_1_1StructuredMesh.html#a8a86b5005b0f5a4591bb9844f8f097a0" title="Mesh increments.">delta</a>;        
<a name="l00203"></a>00203   <span class="comment">//</span>
<a name="l00204"></a>00204   <span class="comment">// dxyz[X](i-1)   dxyz[X](i)    dxyz[X](i+1)</span>
<a name="l00205"></a>00205   <span class="comment">//            \         |          /</span>
<a name="l00206"></a>00206   <span class="comment">//         |&lt;-----&gt;|&lt;-------&gt;|&lt;---------&gt;|    &lt;--- deltas at volumes   </span>
<a name="l00207"></a>00207   <span class="comment">//         |       |         |           |</span>
<a name="l00208"></a>00208   <span class="comment">//             W        P          E                  </span>
<a name="l00209"></a>00209   <span class="comment">//       --|---*---|----*----|-----*-----|--- &lt;--- the mesh</span>
<a name="l00210"></a>00210   <span class="comment">//             |   w    |    e     |</span>
<a name="l00211"></a>00211   <span class="comment">//             |&lt;------&gt;|&lt;--------&gt;|          &lt;--- deltas at faces</span>
<a name="l00212"></a>00212   <span class="comment">//                 /          \                </span>
<a name="l00213"></a>00213   <span class="comment">//          dface[X](i)    dface[X](i+1)             </span>
<a name="l00214"></a>00214   <span class="comment">//                      </span>
<a name="l00215"></a><a class="code" href="classTuna_1_1StructuredMesh.html#aea159ef45b6d47b8496b18dca4cdad0d">00215</a>   vector&lt;prec_t&gt; <a class="code" href="classTuna_1_1StructuredMesh.html#aea159ef45b6d47b8496b18dca4cdad0d" title="Array of deltas for nonuniform meshes.">dxyz</a>[3];       
<a name="l00216"></a><a class="code" href="classTuna_1_1StructuredMesh.html#a14421bdd2cb5ec4b373c9ef9f41a90ba">00216</a>   vector&lt;prec_t&gt; <a class="code" href="classTuna_1_1StructuredMesh.html#a14421bdd2cb5ec4b373c9ef9f41a90ba" title="Array of deltas for faces in FV method.">dface</a>[3];       
<a name="l00217"></a>00217 
<a name="l00218"></a>00218   <span class="keyword">typename</span> vector&lt;prec_t&gt;::const_iterator viter;
<a name="l00219"></a>00219 
<a name="l00220"></a>00220 <span class="keyword">private</span>:
<a name="l00221"></a>00221 
<a name="l00222"></a>00222 };
<a name="l00223"></a>00223 
<a name="l00227"></a>00227 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Tadaptor&gt;
<a name="l00228"></a><a class="code" href="classTuna_1_1StructuredMesh.html#a1cc9d6efd5e3372830be91d85774aeb6">00228</a> <a class="code" href="classTuna_1_1StructuredMesh.html#a1cc9d6efd5e3372830be91d85774aeb6" title="Default constructor.">StructuredMesh&lt;Tadaptor&gt;::StructuredMesh</a>() {
<a name="l00229"></a>00229   <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0; i &lt; this-&gt;Dim; ++i) {
<a name="l00230"></a>00230     extent_nodes(i)   = 1;
<a name="l00231"></a>00231     extent_volumes(i) = 1;
<a name="l00232"></a>00232     delta(i)          = 1.0;
<a name="l00233"></a>00233   }
<a name="l00234"></a>00234 }
<a name="l00235"></a>00235 
<a name="l00241"></a>00241 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Tadaptor&gt;
<a name="l00242"></a><a class="code" href="classTuna_1_1StructuredMesh.html#ab3cb2e800bddcbb41eb26abe3766e504">00242</a> <a class="code" href="classTuna_1_1StructuredMesh.html#a1cc9d6efd5e3372830be91d85774aeb6" title="Default constructor.">StructuredMesh&lt;Tadaptor&gt;::StructuredMesh</a>(<a class="code" href="classTuna_1_1StructuredMesh.html#a2466a6c86a4e811d7dff4fc63a9bb400" title="Precision for all calculations.">prec_t</a> l1, <span class="keywordtype">int</span> e1) {
<a name="l00243"></a>00243     extent_nodes(0)   = e1;
<a name="l00244"></a>00244     extent_volumes(0) = e1 + 1;
<a name="l00245"></a>00245     length(0)         = l1;
<a name="l00246"></a>00246     delta(0)          = l1 / (e1 - 1);
<a name="l00247"></a>00247 }
<a name="l00248"></a>00248 
<a name="l00256"></a>00256 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Tadaptor&gt;
<a name="l00257"></a><a class="code" href="classTuna_1_1StructuredMesh.html#ad58a171e0b74c53f4edfa2426e9a09f4">00257</a> <a class="code" href="classTuna_1_1StructuredMesh.html#a1cc9d6efd5e3372830be91d85774aeb6" title="Default constructor.">StructuredMesh&lt;Tadaptor&gt;::StructuredMesh</a>(<a class="code" href="classTuna_1_1StructuredMesh.html#a2466a6c86a4e811d7dff4fc63a9bb400" title="Precision for all calculations.">prec_t</a> l1, <span class="keywordtype">int</span> e1, 
<a name="l00258"></a>00258                                            <a class="code" href="classTuna_1_1StructuredMesh.html#a2466a6c86a4e811d7dff4fc63a9bb400" title="Precision for all calculations.">prec_t</a> l2, <span class="keywordtype">int</span> e2) {
<a name="l00259"></a>00259     extent_nodes(0)   = e1;
<a name="l00260"></a>00260     extent_nodes(1)   = e2;
<a name="l00261"></a>00261     extent_volumes(0) = e1 + 1;
<a name="l00262"></a>00262     extent_volumes(1) = e2 + 1;
<a name="l00263"></a>00263     length(0)         = l1;
<a name="l00264"></a>00264     length(1)         = l2;
<a name="l00265"></a>00265     delta(0)          = l1 / (e1 - 1);
<a name="l00266"></a>00266     delta(1)          = l2 / (e2 - 1);
<a name="l00267"></a>00267 }
<a name="l00268"></a>00268 
<a name="l00278"></a>00278 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Tadaptor&gt;
<a name="l00279"></a><a class="code" href="classTuna_1_1StructuredMesh.html#a595567d6c34e6a3bcc563edcac57dad7">00279</a> <a class="code" href="classTuna_1_1StructuredMesh.html#a1cc9d6efd5e3372830be91d85774aeb6" title="Default constructor.">StructuredMesh&lt;Tadaptor&gt;::StructuredMesh</a>(<a class="code" href="classTuna_1_1StructuredMesh.html#a2466a6c86a4e811d7dff4fc63a9bb400" title="Precision for all calculations.">prec_t</a> l1, <span class="keywordtype">int</span> e1, 
<a name="l00280"></a>00280                                          <a class="code" href="classTuna_1_1StructuredMesh.html#a2466a6c86a4e811d7dff4fc63a9bb400" title="Precision for all calculations.">prec_t</a> l2, <span class="keywordtype">int</span> e2, 
<a name="l00281"></a>00281                                          <a class="code" href="classTuna_1_1StructuredMesh.html#a2466a6c86a4e811d7dff4fc63a9bb400" title="Precision for all calculations.">prec_t</a> l3, <span class="keywordtype">int</span> e3) {
<a name="l00282"></a>00282     extent_nodes(0)   = e1;
<a name="l00283"></a>00283     extent_nodes(1)   = e2;
<a name="l00284"></a>00284     extent_nodes(2)   = e3;
<a name="l00285"></a>00285     extent_volumes(0) = e1 + 1;
<a name="l00286"></a>00286     extent_volumes(1) = e2 + 1;
<a name="l00287"></a>00287     extent_volumes(2) = e3 + 1;
<a name="l00288"></a>00288     length(0)         = l1;
<a name="l00289"></a>00289     length(1)         = l2;
<a name="l00290"></a>00290     length(2)         = l3;
<a name="l00291"></a>00291     delta(0)          = l1 / (e1 - 1);
<a name="l00292"></a>00292     delta(1)          = l2 / (e2 - 1);
<a name="l00293"></a>00293     delta(2)          = l3 / (e3 - 1);  
<a name="l00294"></a>00294 }
<a name="l00295"></a>00295 
<a name="l00299"></a>00299 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Tadaptor&gt;
<a name="l00300"></a><a class="code" href="classTuna_1_1StructuredMesh.html#a6b88e5491a3a15de414697675cc849ea">00300</a> <a class="code" href="classTuna_1_1StructuredMesh.html#a1cc9d6efd5e3372830be91d85774aeb6" title="Default constructor.">StructuredMesh&lt;Tadaptor&gt;::StructuredMesh</a>(<span class="keyword">const</span> <a class="code" href="classTuna_1_1StructuredMesh.html" title="General structured meshes on rectangular domains.">StructuredMesh&lt;Tadaptor&gt;</a>&amp; other) 
<a name="l00301"></a>00301 {
<a name="l00302"></a>00302   extent_nodes    = other.<a class="code" href="classTuna_1_1StructuredMesh.html#ac472939abf443b774c2db7b14d41582c" title="Extent for nodes in the mesh.">extent_nodes</a>;
<a name="l00303"></a>00303   extent_volumes  = other.<a class="code" href="classTuna_1_1StructuredMesh.html#aa02e4ec5662120aa1035987bbe7340ac" title="Extent for volumes in the mesh.">extent_volumes</a>;
<a name="l00304"></a>00304   length          = other.<a class="code" href="classTuna_1_1StructuredMesh.html#a0a194d778e5d3a37ded19c495aa61b75" title="Length of the mesh.">length</a>;
<a name="l00305"></a>00305   delta           = other.<a class="code" href="classTuna_1_1StructuredMesh.html#a8a86b5005b0f5a4591bb9844f8f097a0" title="Mesh increments.">delta</a>;
<a name="l00306"></a>00306 }
<a name="l00307"></a>00307 
<a name="l00313"></a>00313 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Tadaptor&gt;
<a name="l00314"></a><a class="code" href="classTuna_1_1StructuredMesh.html#a621b58febbf4e84dc7db8c32f29a552f">00314</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classTuna_1_1StructuredMesh.html#a621b58febbf4e84dc7db8c32f29a552f" title="Resize the mesh in 1D.">StructuredMesh&lt;Tadaptor&gt;::resize</a>(<a class="code" href="classTuna_1_1StructuredMesh.html#a2466a6c86a4e811d7dff4fc63a9bb400" title="Precision for all calculations.">prec_t</a> l1, <span class="keywordtype">int</span> e1) {
<a name="l00315"></a>00315     extent_nodes(0)   = e1;
<a name="l00316"></a>00316     extent_volumes(0) = e1 + 1;
<a name="l00317"></a>00317     length(0)         = l1;
<a name="l00318"></a>00318     delta(0)          = l1 / (e1 - 1);
<a name="l00319"></a>00319 }
<a name="l00320"></a>00320 
<a name="l00328"></a>00328 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Tadaptor&gt;
<a name="l00329"></a><a class="code" href="classTuna_1_1StructuredMesh.html#aeaa8633534592ed5c4f4d372248b9b70">00329</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classTuna_1_1StructuredMesh.html#a621b58febbf4e84dc7db8c32f29a552f" title="Resize the mesh in 1D.">StructuredMesh&lt;Tadaptor&gt;::resize</a>(<a class="code" href="classTuna_1_1StructuredMesh.html#a2466a6c86a4e811d7dff4fc63a9bb400" title="Precision for all calculations.">prec_t</a> l1, <span class="keywordtype">int</span> e1, 
<a name="l00330"></a>00330                                              <a class="code" href="classTuna_1_1StructuredMesh.html#a2466a6c86a4e811d7dff4fc63a9bb400" title="Precision for all calculations.">prec_t</a> l2, <span class="keywordtype">int</span> e2) {
<a name="l00331"></a>00331     extent_nodes(0)   = e1;
<a name="l00332"></a>00332     extent_nodes(1)   = e2;
<a name="l00333"></a>00333     extent_volumes(0) = e1 + 1;
<a name="l00334"></a>00334     extent_volumes(1) = e2 + 1;
<a name="l00335"></a>00335     length(0)         = l1;
<a name="l00336"></a>00336     length(1)         = l2;
<a name="l00337"></a>00337     delta(0)          = l1 / (e1 - 1);
<a name="l00338"></a>00338     delta(1)          = l2 / (e2 - 1);
<a name="l00339"></a>00339 }
<a name="l00340"></a>00340 
<a name="l00350"></a>00350 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Tadaptor&gt;
<a name="l00351"></a><a class="code" href="classTuna_1_1StructuredMesh.html#ac2e97865db876f312d8692555fc12de8">00351</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classTuna_1_1StructuredMesh.html#a621b58febbf4e84dc7db8c32f29a552f" title="Resize the mesh in 1D.">StructuredMesh&lt;Tadaptor&gt;::resize</a>(<a class="code" href="classTuna_1_1StructuredMesh.html#a2466a6c86a4e811d7dff4fc63a9bb400" title="Precision for all calculations.">prec_t</a> l1, <span class="keywordtype">int</span> e1, 
<a name="l00352"></a>00352                                                <a class="code" href="classTuna_1_1StructuredMesh.html#a2466a6c86a4e811d7dff4fc63a9bb400" title="Precision for all calculations.">prec_t</a> l2, <span class="keywordtype">int</span> e2, 
<a name="l00353"></a>00353                                                <a class="code" href="classTuna_1_1StructuredMesh.html#a2466a6c86a4e811d7dff4fc63a9bb400" title="Precision for all calculations.">prec_t</a> l3, <span class="keywordtype">int</span> e3) {
<a name="l00354"></a>00354     extent_nodes(0)   = e1;
<a name="l00355"></a>00355     extent_nodes(1)   = e2;
<a name="l00356"></a>00356     extent_nodes(2)   = e3;
<a name="l00357"></a>00357     extent_volumes(0) = e1 + 1;
<a name="l00358"></a>00358     extent_volumes(1) = e2 + 1;
<a name="l00359"></a>00359     extent_volumes(2) = e3 + 1;
<a name="l00360"></a>00360     length(0)         = l1;
<a name="l00361"></a>00361     length(1)         = l2;
<a name="l00362"></a>00362     length(2)         = l3;
<a name="l00363"></a>00363     delta(0)          = l1 / (e1 - 1);
<a name="l00364"></a>00364     delta(1)          = l2 / (e2 - 1);
<a name="l00365"></a>00365     delta(2)          = l3 / (e3 - 1);
<a name="l00366"></a>00366 }
<a name="l00367"></a>00367 
<a name="l00371"></a>00371 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Tadaptor&gt;
<a name="l00372"></a>00372 <a class="code" href="classTuna_1_1StructuredMesh.html" title="General structured meshes on rectangular domains.">StructuredMesh&lt;Tadaptor&gt;</a>&amp; <a class="code" href="classTuna_1_1StructuredMesh.html" title="General structured meshes on rectangular domains.">StructuredMesh&lt;Tadaptor&gt;::operator</a>=
<a name="l00373"></a><a class="code" href="classTuna_1_1StructuredMesh.html#a35b23b52af6436f69566a173302482b8">00373</a> (<span class="keyword">const</span> <a class="code" href="classTuna_1_1StructuredMesh.html" title="General structured meshes on rectangular domains.">StructuredMesh&lt;Tadaptor&gt;</a>&amp; other) {
<a name="l00374"></a>00374   <span class="keywordflow">if</span> (<span class="keyword">this</span> != &amp;other) {
<a name="l00375"></a>00375     extent_nodes   = other.<a class="code" href="classTuna_1_1StructuredMesh.html#ac472939abf443b774c2db7b14d41582c" title="Extent for nodes in the mesh.">extent_nodes</a>;
<a name="l00376"></a>00376     extent_volumes = other.extent_volumes;
<a name="l00377"></a>00377     delta          = other.delta;
<a name="l00378"></a>00378     length         = other.length;
<a name="l00379"></a>00379   } <span class="keywordflow">else</span> {
<a name="l00380"></a>00380     std::cout &lt;&lt; <span class="stringliteral">&quot;\n +-----+&quot;</span> 
<a name="l00381"></a>00381               &lt;&lt; <span class="stringliteral">&quot;\n | Tuna::DiscreteGeom::StructuredMesh::operator= : &quot;</span>
<a name="l00382"></a>00382               &lt;&lt;<span class="stringliteral">&quot; \n | WARNING : you are trying to do : mesh = mesh&quot;</span>
<a name="l00383"></a>00383               &lt;&lt; <span class="stringliteral">&quot;\n +-----+&quot;</span>;
<a name="l00384"></a>00384   }
<a name="l00385"></a>00385   <span class="keywordflow">return</span> *<span class="keyword">this</span>;
<a name="l00386"></a>00386 }
<a name="l00387"></a>00387 
<a name="l00391"></a>00391 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Tadaptor&gt;
<a name="l00392"></a><a class="code" href="classTuna_1_1StructuredMesh.html#af921bd8d0279b7510d8db6f7d87652c2">00392</a> <span class="keywordtype">bool</span> <a class="code" href="classTuna_1_1StructuredMesh.html#af921bd8d0279b7510d8db6f7d87652c2" title="Print the info of the mesh on to the screen.">StructuredMesh&lt;Tadaptor&gt;::print</a>() {
<a name="l00393"></a>00393 
<a name="l00394"></a>00394   <span class="keywordtype">string</span> axes = <span class="stringliteral">&quot;XYZ&quot;</span>;
<a name="l00395"></a>00395 
<a name="l00396"></a>00396   std::cout &lt;&lt; <span class="stringliteral">&quot;\n +----- TUNA info -----+&quot;</span>
<a name="l00397"></a>00397             &lt;&lt; <span class="stringliteral">&quot;\n | StructuredMesh&lt; &quot;</span>;
<a name="l00398"></a>00398   asDerived().print();
<a name="l00399"></a>00399 
<a name="l00400"></a>00400   <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0; i &lt; this-&gt;Dim; ++i) {
<a name="l00401"></a>00401     std::cout &lt;&lt; <span class="stringliteral">&quot;\n | &quot;</span> &lt;&lt; axes[i] &lt;&lt; <span class="stringliteral">&quot;-axis : length = &quot;</span> &lt;&lt; length(i)
<a name="l00402"></a>00402               &lt;&lt; <span class="stringliteral">&quot;; nodes = &quot;</span>&lt;&lt; extent_nodes(i)
<a name="l00403"></a>00403               &lt;&lt; <span class="stringliteral">&quot;; volumes = &quot;</span>&lt;&lt; extent_volumes(i) 
<a name="l00404"></a>00404               &lt;&lt; <span class="stringliteral">&quot;; delta = &quot;</span> &lt;&lt; delta(i);
<a name="l00405"></a>00405   }
<a name="l00406"></a>00406   std::cout &lt;&lt; <span class="stringliteral">&quot;\n +---------------------+\n &quot;</span>;
<a name="l00407"></a>00407 
<a name="l00408"></a>00408   <span class="keywordflow">return</span> 0;
<a name="l00409"></a>00409 }
<a name="l00410"></a>00410 
<a name="l00414"></a>00414 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Tadaptor&gt;
<a name="l00415"></a><a class="code" href="classTuna_1_1StructuredMesh.html#a5a92884f99465534c4235c87fec5d486">00415</a> <span class="keywordtype">bool</span> <a class="code" href="classTuna_1_1StructuredMesh.html#af921bd8d0279b7510d8db6f7d87652c2" title="Print the info of the mesh on to the screen.">StructuredMesh&lt;Tadaptor&gt;::print</a>(<span class="keywordtype">int</span> I, <span class="keywordtype">int</span> J, <span class="keywordtype">int</span> K) {
<a name="l00416"></a>00416 
<a name="l00417"></a>00417   <span class="keywordtype">string</span> axes = <span class="stringliteral">&quot;XYZ&quot;</span>;
<a name="l00418"></a>00418 
<a name="l00419"></a>00419   std::cout &lt;&lt; <span class="stringliteral">&quot;\n +----- TUNA info -----+&quot;</span>
<a name="l00420"></a>00420             &lt;&lt; <span class="stringliteral">&quot;\n | StructuredMesh&lt; &quot;</span>;
<a name="l00421"></a>00421   asDerived().print();
<a name="l00422"></a>00422 
<a name="l00423"></a>00423   <span class="keywordflow">if</span> (this-&gt;Dim == 1)
<a name="l00424"></a>00424     std::cout &lt;&lt; <span class="stringliteral">&quot;\n | Proc (&quot;</span>&lt;&lt; I &lt;&lt; <span class="stringliteral">&quot;) &quot;</span>;
<a name="l00425"></a>00425   <span class="keywordflow">if</span> (this-&gt;Dim == 2)  
<a name="l00426"></a>00426     std::cout &lt;&lt; <span class="stringliteral">&quot;\n | Proc (&quot;</span>&lt;&lt; I &lt;&lt; <span class="stringliteral">&quot; ,&quot;</span> &lt;&lt; J &lt;&lt;<span class="stringliteral">&quot;) &quot;</span>;
<a name="l00427"></a>00427   <span class="keywordflow">if</span> (this-&gt;Dim == 3)
<a name="l00428"></a>00428     std::cout &lt;&lt; <span class="stringliteral">&quot;\n | Proc (&quot;</span>&lt;&lt; I &lt;&lt; <span class="stringliteral">&quot; ,&quot;</span> &lt;&lt; J &lt;&lt; <span class="stringliteral">&quot;, &quot;</span> &lt;&lt; <span class="stringliteral">&quot;) &quot;</span>;
<a name="l00429"></a>00429 
<a name="l00430"></a>00430 
<a name="l00431"></a>00431   <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0; i &lt; this-&gt;Dim; ++i) {
<a name="l00432"></a>00432     std::cout &lt;&lt; <span class="stringliteral">&quot; | &quot;</span> &lt;&lt; axes[i] &lt;&lt; <span class="stringliteral">&quot;-axis : length = &quot;</span> &lt;&lt; length(i)
<a name="l00433"></a>00433               &lt;&lt; <span class="stringliteral">&quot;; nodes = &quot;</span>&lt;&lt; extent_nodes(i)
<a name="l00434"></a>00434               &lt;&lt; <span class="stringliteral">&quot;; volumes = &quot;</span>&lt;&lt; extent_volumes(i) 
<a name="l00435"></a>00435               &lt;&lt; <span class="stringliteral">&quot;; delta = &quot;</span> &lt;&lt; delta(i);
<a name="l00436"></a>00436   }
<a name="l00437"></a>00437   std::cout &lt;&lt; <span class="stringliteral">&quot;\n +---------------------+\n &quot;</span>;
<a name="l00438"></a>00438 
<a name="l00439"></a>00439   <span class="keywordflow">return</span> 0;
<a name="l00440"></a>00440 }
<a name="l00441"></a>00441 
<a name="l00442"></a>00442 
<a name="l00443"></a>00443 } <span class="comment">// Tuna namespace</span>
<a name="l00444"></a>00444 
<a name="l00445"></a>00445 <span class="preprocessor">#endif // _STRUCTUREDMESH_H</span>
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr size="1">
<div align="center">
Last modification: Sun Aug 28 09:57:21 CDT 2011
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&copy; 2011 LMCS-UNAM
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Generated by <a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="top" border="0" height="25"></a> 1.6.1 </div>

